<h1>Group</h1>
<p align="right"><a href="<?php echo site_url('product/product/create_product');?>">Add Product</a></p>
<!--<div id="infoMessage"><?php echo $message;?></div>-->

<table class="table table-striped table-bordered" width="100%" id="example">
	<thead>
    <tr>
		<th>Product Name</th>
		<th>Product Code</th>
        <th>Category</th>
        <th>Company</th>
        <th>Purchase Price</th>
        <th>Selling Price</th>
        <th>Opening Stock</th>
        <th>Alert Quantity</th>
        <th>Action</th>
	</tr>
    </thead>
	<?php foreach ($users as $user):?>
		<tr>
			<td><?php echo $user->name; ?></td>
			<td><?php  echo $user->code; ?></td>
            <td><?php  echo $user->category_name; ?></td>
            <td><?php  echo $user->company_name; ?></td>
            <td><?php  echo $user->purchase_price; ?></td>
            <td><?php  echo $user->selling_price; ?></td>
            <td><?php  echo $user->opening_stock; ?></td>
            <td><?php  echo $user->alert_quantity; ?></td>
			<td><?php echo anchor("product/product/edit_product/".$user->id, 'Edit') ;?>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
               <a href="<?php echo site_url('product/product/delete_product/').'/'.$user->id;?>" onclick="return confirm('Are you sure you want to DELETE this product ??')">Delete</a>
         </td>
		</tr>
	<?php endforeach;?>
</table>

<!--<p><a href="<?php echo site_url('auth/create_user');?>">Create a new user</a> | <a href="<?php echo site_url('auth/create_group');?>">Create a new group</a>
<a href="<?php echo site_url('auth/logout');?>">Logout</a>
</p>-->
